import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

import { ApiProperty } from '@nestjs/swagger';
import { BaseEntity } from '../base.entity';

@Entity({ name: 'sys_template' })
export default class SysTemplate extends BaseEntity {
  @PrimaryGeneratedColumn()
  @ApiProperty()
  id: number;

  @ApiProperty()
  @Column()
  name: string;

  @ApiProperty()
  @Column()
  status: number;

  @ApiProperty()
  @Column()
  image: string;

  @ApiProperty()
  @Column()
  desc: string;

  @ApiProperty()
  @Column()
  content: string;

  @ApiProperty()
  @Column({ name: 'category_id' })
  categoryId: number;
}
